        <?php
            // get data for chart
            $xAxis      = '';
            $series = array();
            foreach($this->exportTitle as $key=>$title){
                if($key != 'total'){
                    $series[$key]   = "{name: '$title',data: [";
                }
            }
            $stt        = 0;
            foreach($this->exportData as $key=>$value){
                if($stt > 0){
                    $xAxis  .= ', ';
                }
                $xAxis  .= "'".$key."'";
                foreach($value as $key2=>$value2){
                    if($key2 != 'total'){
                        $value2 = (int)$value2;
                        if($stt > 0)
                            $series[$key2] .= ', ';
                        $series[$key2] .= $value2;
                    }
                }
                ++$stt;
            }
            foreach($this->exportTitle as $key=>$title){
                if($key != 'total'){
                    $series[$key]   .= ']}';
                }
            }
            $series = implode(",",$series);
        ?>
        <script src="/js/string.js"></script>
        <script src="/highcharts-3.0.1/js/highcharts.js"></script>
        <script src="/highcharts-3.0.1/js/modules/exporting.js"></script>
        <script type="text/javascript">
            $(function () {
                    $('#chart').highcharts({
                        chart: {
                            type: 'line',
                            marginRight: 40,
                            marginBottom: 130
                        },
                        title: {
                            text: '<?php echo $this->title;?>',
                            x: -20 //center
                        },
                        subtitle: {
                            text: '<?php echo $this->subtitle;?>',
                            x: -20
                        },
                        // Title hàng ngang
                        xAxis: {
                            categories: [<?php echo $xAxis; ?>],
                            labels: {
                                    rotation: 75,
                                    x: 7,
                                    y: 55,
                                    style: {'text-decoration': 'underline','color':'#000000','font-size':'12px'}
                                }
                        },
                        // Title hàng dọc
                        yAxis: {
                            title: {
                                text: '<?php echo $this->titleYAxis;?>'
                            },
                            plotLines: [{
                                value: 0,
                                width: 1,
                                color: '#808080'
                            }]
                        },
                        //Hover vào giá trị trên biểu đồ
                        tooltip: {
                            formatter: function() {
                                    return '<b>'+ this.series.name +'</b><br/>'+
                                    this.x +': '+ formatMonney1(this.y, '<?php echo (isset($this->unit) ? $this->unit : '');?>');
                            }
                        },
                        // Chú thích
                        legend: {
                            layout: 'horizontal',//vertical
                            align: 'center',//right
                            verticalAlign: 'top',
                            x: -20,
                            y: 40,
                            borderWidth: 0
                        },
                        //Giá trị trên biểu đồ
                        series: [<?php echo $series;?>]
                    });
                });
    
    
    	</script>
        <div id="chart"></div>